package com.jic.member.controller.power;

import com.jic.common.base.vo.RestResult;
import com.jic.member.request.power.MememberLegalRuleRequest;
import com.jic.member.response.power.MememberLegalRuleResponse;
import com.jic.member.service.power.MemberRuleService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@ApiOperation(value = "等级权益controller")
@RestController
@RequestMapping("/memberRuleFeign")
@Slf4j
public class MemberRuleController {

    @Resource
    MemberRuleService memberRuleService;

    @ApiOperation(value = "查询方法")
    @ResponseBody
    @RequestMapping("/queryMemberRule")
    public RestResult<MememberLegalRuleResponse> queryMemberRule(@RequestBody MememberLegalRuleRequest mememberLegalRuleRequest) {
        RestResult result = new RestResult();
        List<MememberLegalRuleResponse> mememberLegalRuleResponse=memberRuleService.queryMemberRule(mememberLegalRuleRequest);
        result.setCode("0000");
        result.setData(mememberLegalRuleResponse);
        return result;
    }
}
